﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Widgetsphere.Generator.Models
{
	public static class Extensions
	{
		public static List<Relation> GetAllChildRelations(this List<Table> tableList)
		{
			List<Relation> retval = new List<Relation>();
			foreach (Table table in tableList)
			{
				foreach (Relation relation in table.ChildRoleRelations)
				{
					retval.Add(relation);
				}
			}
			return retval;
		}
	}
}
